home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / elk-2_0.lha / elk-2.0 / doc / kernel / kernel.ms next >
Text File  |  1992-10-27  |  34KB  |  1,449 lines

  1. .so ../tmac/tmac.scheme
  2. .RP
  3. .ds R "R\v'-.3m'\s-14\s0\v'.3m'RS
  4. .ds 1 "\v'.3m'\s-11\s0\v'-.3m'
  5. .ds 2 "\v'.3m'\s-12\s0\v'-.3m'
  6. .TL
  7. Reference Manual for the
  8. .br
  9. Elk Extension Language Interpreter
  10. .AU
  11. Oliver Laumann
  12. .AB
  13. This document provides a complete list of all primitive procedures
  14. and special forms implemented by the Elk Extension Language.
  15. Only those procedures and special forms that are not defined in the
  16. \f2Revised\v'-.3m'\s-14\s0\v'.3m' Report on the Algorithmic
  17. Language Scheme\fP by Jonathan Rees and William Clinger (editors)
  18. are described in detail.
  19. The procedures that are mentioned in the report are only listed
  20. without description or examples.
  21. .AE
  22. .
  23. .Ch Lambda Expressions, Procedures
  24. .
  25. .Sy lambda formals body
  26. See \*R.
  27. .
  28. .Pr procedure-lambda procedure
  29. Returns a copy of the \f2lambda\fP expression which has been
  30. evaluated to create the given procedure.
  31. .br
  32. Example:
  33. .Ss
  34. (define (square x) (* x x))
  35. (procedure-lambda square)    ==>  (lambda (x) (* x x))
  36. .Se
  37. .
  38. .Pr procedure? obj
  39. See \*R.
  40. .
  41. .Pr primitive? obj
  42. Returns #t if \f2obj\fP is a primitive procedure, #f otherwise.
  43. .
  44. .Pr compound? obj
  45. Returns #t if \f2obj\fP is a compound procedure (a procedure that
  46. has been created by evaluating a lambda expression), #f otherwise.
  47. .
  48. .Ch Local Bindings
  49. .
  50. .Sy let bindings body
  51. .Up
  52. .Sy let* bindings body
  53. .Up
  54. .Sy letrec bindings body
  55. See \*R.
  56. .
  57. .Ch Fluid Binding
  58. .
  59. .Sy fluid-let bindings body
  60. \f2bindings\fP is of the form ((\f2variable\*1\fP \f2init1\fP) ...).
  61. The \f2init\fPs are temporarily assigned to the \f2variable\fPs
  62. and the \f2body\fP is executed.
  63. The variables must be bound in an enclosing scope.
  64. When the body is exited normally or by invoking a control point,
  65. the old values of the variables are restored.
  66. In the latter case, when the control returns back to the body
  67. of the fluid-let by invocation of a control point created within
  68. the body, the bindings are changed again to the values they had
  69. when the body exited.
  70. .br
  71. Examples:
  72. .Ss
  73. ((lambda (x)
  74.   (+ x (fluid-let ((x 3)) x))) 1)    ==>  4
  75. .Se
  76. .Ss
  77. (fluid-let ((print-length 2))
  78.   (write '(a b c d)))    ==>  '(a b ...)
  79. .Se
  80. .Ss
  81. (define (errset thunk)
  82.   (call-with-current-continuation
  83.     (lambda (catch)
  84.       (fluid-let
  85.           ((error-handler
  86.             (lambda msg (catch #f))))
  87.         (list (thunk))))))
  88. .sp
  89. (errset (lambda () (+ 1 2)))    ==>  (3)
  90. (errset (lambda () (/ 1 0)))    ==>  #f
  91. .Se
  92. .
  93. .Ch Definitions
  94. .
  95. .Sy define variable expression
  96. .Up
  97. .Sy define (variable formals) body
  98. .Up
  99. .Sy define (variable . formal) body
  100. See \*R.
  101. .br
  102. Returns a symbol, the identifier that has been bound.
  103. Definitions may appear anywhere within a local body (e.\|g. a lambda
  104. body or a \f2let\fP).
  105. If the \f2expression\fP is omitted, \f2void\fP (the non-printing
  106. object) is used.
  107. .br
  108. Examples:
  109. .Ss
  110. (define nil #f)
  111. .Se
  112. .Ss
  113. (define ((f x) y) (cons x y))
  114. (define (g x) ((f x) 5))
  115. (g 'a)    ==>  (a . 5)
  116. .Se
  117. .
  118. .Ch Assignment
  119. .
  120. .Sy set! variable expression
  121. See \*R.
  122. .br
  123. Returns the previous value of \f2variable\fP.
  124. .br
  125. Examples:
  126. .Ss
  127. (define-macro (swap x y)
  128.   `(set! ,x (set! ,y ,x)))
  129. .Se
  130. .
  131. .Ch Procedure Application
  132. .
  133. .Sy operator operand\*1 ...
  134. See \*R.
  135. \f2operator\fP can be a macro (see below).
  136. .
  137. .Pr apply arg\*1 ... args
  138. See \*R.
  139. .
  140. .Ch Quotation, Quasiquotation
  141. .
  142. .Sy quote datum
  143. .Up
  144. .SH
  145. .tl ,\f3'\fP\f2datum\fP,,\f3syntax\fP,
  146. .LP
  147. .Up
  148. .SH
  149. .tl ,\f2constant\fP,,\f3syntax\fP
  150. .Id constant
  151. .LP
  152. See \*R.
  153. .
  154. .Sy quasiquote expression
  155. .Up
  156. .Sy unquote expression
  157. .Up
  158. .Sy unquote-splicing expression
  159. See \*R.
  160. .
  161. .Ch Sequencing
  162. .
  163. .Sy begin expression\*1 expression\*2 ...
  164. See \*R.
  165. .
  166. .Sy begin1 expression\*1 expression\*2 ...
  167. Identical to \f2begin\fP, except that the result of the first
  168. \f2expression\fP is returned.
  169. .
  170. .Ch Conditionals
  171. .
  172. .Sy if test consequent alternate
  173. .Up
  174. .Sy if test consequent
  175. See \*R.
  176. .br
  177. In the first form, \f2alternate\fP can be a sequence of expressions
  178. (implicit \f2begin\fP).
  179. .
  180. .Sy case key clause\*1 clause\*2 ...
  181. See \*R.
  182. .br
  183. Each \f2clause\fP not beginning with \f2else\fP can be of the form
  184. .DS
  185. ((\f2datum\*1\fP ...) \f2expression\*1\fP \f2expression\*2\fP ...)
  186. .DE
  187. or
  188. .DS
  189. (\f2datum\fP \f2expression\*1\fP \f2expression\*2\fP ...)
  190. .DE
  191. In the latter case, the \f2key\fP is matched against the \f2datum\fP.
  192. .
  193. .Sy cond clause\*1 clause\*2 ...
  194. See \*R.
  195. .
  196. .Sy and test\*1 ...
  197. .Up
  198. .Sy or test\*1 ...
  199. See \*R.
  200. .
  201. .Ch Booleans
  202. .
  203. .Pr not obj
  204. See \*R.
  205. .
  206. .Pr boolean? obj
  207. See \*R.
  208. .
  209. .Ch Iteration
  210. .
  211. .Sy let variable bindings body
  212. ``Named \f2let\fP''.  See \*R.
  213. .
  214. .Pr map procedure list\*1 list\*2 ...
  215. .Up
  216. .Pr for-each procedure list\*1 list\*2 ...
  217. See \*R.  \f2for-each\fP returns the empty list.
  218. .
  219. .Sy do initializations test body
  220. See \*R.
  221. .
  222. .Ch Continuations
  223. .
  224. .Pr call-with-current-continuation procedure
  225. See \*R.
  226. .
  227. .Pr control-point? obj
  228. Returns #t if \f2obj\fP is a control point (a continuation),
  229. #f otherwise.
  230. .
  231. .Pr dynamic-wind thunk thunk thunk
  232. \f2dynamic-wind\fP is a generalization of the \f2unwind-protect\fP
  233. facility provided by many Lisp systems.
  234. .br
  235. All three arguments are procedures of no arguments.
  236. In the normal case, all three thunks are applied in order.
  237. The first thunk is also applied when the body (the second thunk)
  238. is entered by the application of a control point created within
  239. the body (by means of \f2call-with-current-continuation\fP).
  240. Similarly, the third thunk is also applied whenever the body is
  241. exited by invocation of a control point created outside the body.
  242. .br
  243. Examples:
  244. .Ss
  245. (define-macro (unwind-protect body . unwind-forms)
  246.   `(dynamic-wind
  247.     (lambda () #f)
  248.     (lambda () ,body)
  249.     (lambda () ,@unwind-forms)))
  250. .Se
  251. .Ss
  252. (let ((f (open-input-file "foo")))
  253.   (dynamic-wind
  254.     (lambda () #f)
  255.     (lambda () \f2do something with\fP f)
  256.     (lambda () (close-input-port f))))
  257. .Se
  258. .
  259. .Ch Delayed Evaluation
  260. .
  261. .Sy delay expression
  262. .Up
  263. .Pr force promise
  264. See \*R.
  265. .
  266. .Pr promise? obj
  267. Returns #t if \f2obj\fP is a promise, an object returned by the
  268. application of \f2delay\fP.
  269. Otherwise #f is returned.
  270. .
  271. .Ch Equivalence Predicates
  272. .
  273. .Pr eq? obj\*1 obj\*2
  274. .Up
  275. .Pr eqv? obj\*1 obj\*2
  276. .Up
  277. .Pr equal? obj\*1 obj\*2
  278. See \*R.
  279. .
  280. .Ch Pairs and Lists
  281. .
  282. .Pr cons obj\*1 obj\*2
  283. See \*R.
  284. .
  285. .Pr car pair
  286. .Up
  287. .Pr cdr pair
  288. See \*R.
  289. .
  290. .Pr cxr pair pattern
  291. \f2pattern\fP is either a symbol or a string consisting of a combination
  292. of the characters `a' and `d'.
  293. It encodes a sequence of \f2car\fP and \f2cdr\fP operations;
  294. each `a' denotes the application of \f2car\fP, and each `d' denotes
  295. the application of \f2cdr\fP.
  296. For example, \f2(cxr p "ada")\fP is equivalent to \f2(cadar p)\fP.
  297. .
  298. .Pr caar pair
  299. .br
  300.    ...
  301. .br
  302. .Pr cddddr pair
  303. See \*R.
  304. .
  305. .Pr set-car! pair obj
  306. .Up
  307. .Pr set-cdr! pair obj
  308. See \*R.
  309. .br
  310. Both procedures return \f2obj\fP.
  311. .
  312. .Pr make-list k obj
  313. Returns a list of length \f2k\fP initialized with \f2obj\fP.
  314. .br
  315. Examples:
  316. .Ss
  317. (make-list 0 'a)    ==>  ()
  318. (make-list 2 (make-list 2 1))    ==>  ((1 1) (1 1))
  319. .Se
  320. .
  321. .Pr list obj ...
  322. See \*R.
  323. .
  324. .Pr length list
  325. See \*R.
  326. .
  327. .Pr list-ref list k
  328. See \*R.
  329. .
  330. .Pr list-tail list k
  331. See \*R.
  332. .
  333. .Pr last-pair list
  334. See \*R.
  335. .
  336. .Pr append list ...
  337. See \*R.
  338. .
  339. .Pr append! list ...
  340. Like \f2append\fP, except that the original
  341. arguments are modified (destructive \f2append\fP).
  342. The cdr of each argument is changed to point to the next argument.
  343. .br
  344. Examples:
  345. .Ss
  346. (define x '(a b))
  347. (append x '(c d))    ==>  (a b c d)
  348. x    ==>  (a b)
  349. (append! x '(c d))    ==>  (a b c d)
  350. x    ==>  (a b c d)
  351. .Se
  352. .
  353. .Pr reverse list
  354. See \*R.
  355. .
  356. .Pr reverse! list
  357. Destructive \f2reverse\fP.
  358. .
  359. .Pr memq obj list
  360. .Up
  361. .Pr memv obj list
  362. .Up
  363. .Pr member obj list
  364. See \*R.
  365. .
  366. .Pr assq obj alist
  367. .Up
  368. .Pr assv obj alist
  369. .Up
  370. .Pr assoc obj alist
  371. See \*R.
  372. .
  373. .Pr null? obj
  374. .Up
  375. .Pr pair? obj
  376. See \*R.
  377. .
  378. .Pr list? obj
  379. See \*R.
  380. .
  381. .Ch Numbers
  382. .
  383. .Pr = z\*1 z\*2 ...
  384. .Up
  385. .Pr < z\*1 z\*2 ...
  386. .Up
  387. .Pr > z\*1 z\*2 ...
  388. .Up
  389. .Pr <= z\*1 z\*2 ...
  390. .Up
  391. .Pr >= z\*1 z\*2 ...
  392. See \*R.
  393. .
  394. .Pr 1+ z
  395. .Up
  396. .Pr -1+ z
  397. Returns \f2z\fP plus 1 or \f2z\fP minus 1, respectively.
  398. .
  399. .Pr 1- z
  400. A synonym for \f2-1+\fP (for backwards compatibility).
  401. .
  402. .Pr + z\*1 ...
  403. .Up
  404. .Pr * z\*1 ...
  405. See \*R.
  406. .
  407. .Pr - z\*1 z\*2 ...
  408. .Up
  409. .Pr / z\*1 z\*2 ...
  410. See \*R.
  411. .
  412. .Pr zero? z
  413. .Up
  414. .Pr positive? z
  415. .Up
  416. .Pr negative? z
  417. .Up
  418. .Pr odd? z
  419. .Up
  420. .Pr even? z
  421. .Up
  422. .Pr exact? z
  423. .Up
  424. .Pr inexact? z
  425. See \*R.
  426. .br
  427. \f2exact?\fP returns always #f; \f2inexact?\fP returns always #t.
  428. .
  429. .Pr abs z
  430. See \*R.
  431. .
  432. .Pr quotient n\*1 n\*2
  433. .Up
  434. .Pr remainder n\*1 n\*2
  435. .Up
  436. .Pr modulo n\*1 n\*2
  437. See \*R.
  438. .
  439. .Pr gcd n\*1 ...
  440. .Up
  441. .Pr lcm n\*1 ...
  442. See \*R.
  443. .
  444. .Pr floor x
  445. .Up
  446. .Pr ceiling x
  447. .Up
  448. .Pr truncate x
  449. .Up
  450. .Pr round x
  451. See \*R.
  452. .
  453. .Pr sqrt z
  454. See \*R.
  455. .
  456. .Pr exp z
  457. .Up
  458. .Pr log z
  459. .Up
  460. .Pr sin z
  461. .Up
  462. .Pr cos z
  463. .Up
  464. .Pr tan z
  465. .Up
  466. .Pr asin z
  467. .Up
  468. .Pr acos z
  469. .Up
  470. .Pr atan z
  471. .Up
  472. .Pr atan y x
  473. See \*R.
  474. .
  475. .Pr min x\*1 x\*2 ...
  476. .Up
  477. .Pr max x\*1 x\*2 ...
  478. See \*R.
  479. .
  480. .Pr random
  481. Returns an integer pseudo-random number in the range from 0 to
  482. 2\v'-.3m'\s-131\s0\v'.3m'-1.
  483. .
  484. .Pr srandom n
  485. Sets the random number generator to the starting point \f2n\fP.
  486. \f2srandom\fP returns \f2n\fP.
  487. .
  488. .Pr number? obj
  489. .Up
  490. .Pr complex? obj
  491. .Up
  492. .Pr real? obj
  493. .Up
  494. .Pr rational? obj
  495. .Up
  496. .Pr integer? obj
  497. See \*R.
  498. .
  499. .Pr number\(mi>string number
  500. .Up
  501. .Pr number\(mi>string number radix
  502. See \*R.
  503. .
  504. .Pr string\(mi>number string
  505. .Up
  506. .Pr string\(mi>number string radix
  507. See \*R.
  508. .
  509. .Ch Characters
  510. .
  511. .Pr char\(mi>integer char
  512. .Up
  513. .Pr integer\(mi>char n
  514. See \*R.
  515. .
  516. .Pr char-upper-case? char
  517. .Up
  518. .Pr char-lower-case? char
  519. See \*R.
  520. .
  521. .Pr char-alphabetic? char
  522. .Up
  523. .Pr char-numeric? char
  524. .Up
  525. .Pr char-whitespace? char
  526. See \*R.
  527. .
  528. .Pr char-upcase char
  529. .Up
  530. .Pr char-downcase char
  531. See \*R.
  532. .
  533. .Pr char=? char\*1 char\*2
  534. .Up
  535. .Pr char<? char\*1 char\*2
  536. .Up
  537. .Pr char>? char\*1 char\*2
  538. .Up
  539. .Pr char<=? char\*1 char\*2
  540. .Up
  541. .Pr char>=? char\*1 char\*2
  542. See \*R.
  543. .
  544. .Pr char-ci=? char\*1 char\*2
  545. .Up
  546. .Pr char-ci<? char\*1 char\*2
  547. .Up
  548. .Pr char-ci>? char\*1 char\*2
  549. .Up
  550. .Pr char-ci<=? char\*1 char\*2
  551. .Up
  552. .Pr char-ci>=? char\*1 char\*2
  553. See \*R.
  554. .
  555. .Pr char? obj
  556. See \*R.
  557. .
  558. .Ch Strings
  559. .
  560. .Pr string char ...
  561. Returns a string containing the specified characters.
  562. .br
  563. Examples:
  564. .Ss
  565. (string)    ==>  ""
  566. (string #\ea #\espace #\eb)    ==>  "a b"
  567. .Se
  568. .
  569. .Pr string? obj
  570. See \*R.
  571. .
  572. .Pr make-string k char
  573. See \*R.
  574. .
  575. .Pr string-length string
  576. See \*R.
  577. .
  578. .Pr string-ref string k
  579. See \*R.
  580. .
  581. .Pr string-set! string k char
  582. See \*R.
  583. .br
  584. Returns the previous value of element \f2k\fP of the given string.
  585. .
  586. .Pr substring string start end
  587. See \*R.
  588. .
  589. .Pr string-copy string
  590. See \*R.
  591. .
  592. .Pr string-append string ...
  593. See \*R.
  594. .
  595. .Pr list\(mi>string chars
  596. .Up
  597. .Pr string\(mi>list string
  598. See \*R.
  599. .
  600. .Pr string-fill! string char
  601. See \*R.
  602. .br
  603. Returns \f2string\fP.
  604. .
  605. .Pr substring-fill! string start end char
  606. Stores \f2char\fP in every element of \f2string\fP from \f2start\fP
  607. (inclusive) to \f2end\fP (exclusive).
  608. Returns \f2string\fP.
  609. .
  610. .Pr string=? string\*1 string\*2
  611. .Up
  612. .Pr string<? string\*1 string\*2
  613. .Up
  614. .Pr string>? string\*1 string\*2
  615. .Up
  616. .Pr string<=? string\*1 string\*2
  617. .Up
  618. .Pr string>=? string\*1 string\*2
  619. See \*R.
  620. .
  621. .Pr string-ci=? string\*1 string\*2
  622. .Up
  623. .Pr string-ci<? string\*1 string\*2
  624. .Up
  625. .Pr string-ci>? string\*1 string\*2
  626. .Up
  627. .Pr string-ci<=? string\*1 string\*2
  628. .Up
  629. .Pr string-ci>=? string\*1 string\*2
  630. See \*R.
  631. .
  632. .Pr substring? string\*1 string\*2
  633. .Up
  634. .Pr substring-ci? string\*1 string\*2
  635. If \f2string\*1\fP is a substring of \f2string\*2\fP, these
  636. procedures return the starting position of the first occurrence of the
  637. substring within \f2string\*2\fP.
  638. Otherwise #f is returned.
  639. \f2substring-ci?\fP is the case insensitive version of \f2substring?\fP.
  640. .br
  641. Examples:
  642. .Ss
  643. (define s "Hello world")
  644. (substring? "foo" x)    ==>  #f
  645. (substring? "hello" x)    ==>  #f
  646. (substring-ci? "hello" x)    ==>  0
  647. (substring? "!" x)    ==>  11
  648. .Se
  649. .
  650. .Ch Vectors
  651. .
  652. .Pr vector? obj
  653. See \*R.
  654. .
  655. .Pr make-vector k
  656. .Up
  657. .Pr make-vector k fill
  658. See \*R.
  659. .
  660. .Pr vector obj ...
  661. See \*R.
  662. .
  663. .Pr vector-length vector
  664. See \*R.
  665. .
  666. .Pr vector-ref vector k
  667. See \*R.
  668. .
  669. .Pr vector-set! vector k obj
  670. See \*R.
  671. .br
  672. Returns the previous value of element \f2k\fP of the vector.
  673. .
  674. .Pr vector\(mi>list vector
  675. .Up
  676. .Pr list\(mi>vector list
  677. See \*R.
  678. .
  679. .Pr vector-fill! vector fill
  680. See \*R.
  681. .br
  682. Returns \f2vector\fP.
  683. .
  684. .Pr vector-copy vector
  685. Returns a copy of \f2vector\fP.
  686. .
  687. .Ch Symbols
  688. .
  689. .Pr string\(mi>symbol string
  690. .Up
  691. .Pr symbol\(mi>string symbol
  692. See \*R.
  693. .
  694. .Pr put symbol key value
  695. .Up
  696. .Pr put symbol key
  697. Associates \f2value\fP with \f2key\fP in the property list of the
  698. given symbol.
  699. \f2key\fP must be a symbol.
  700. Returns \f2key\fP.
  701. .br
  702. If \f2value\fP is omitted, the property is removed from the symbol's
  703. property list.
  704. .
  705. .Pr get symbol key
  706. Returns the value associated with \f2key\fP in the property
  707. list of \f2symbol\fP.
  708. \f2key\fP must be a symbol.
  709. If no value is associated with \f2key\fP in the symbol's property
  710. list, #f is returned.
  711. .br
  712. Examples:
  713. .Ss
  714. (put 'norway 'capital "Oslo")
  715. (put 'norway 'continent "Europe")
  716. (get 'norway 'capital)    ==>  "Oslo"
  717. .Se
  718. .
  719. .Pr symbol-plist symbol
  720. Returns a copy of the property list of \f2symbol\fP as an \f2alist\fP.
  721. .br
  722. Examples:
  723. .Ss
  724. (put 'norway 'capital "Oslo")
  725. (put 'norway 'continent "Europe")
  726. (symbol-plist 'norway)
  727.    ==>  ((capital . "Oslo") (continent . "Europe"))
  728. (symbol-plist 'foo)    ==>  ()
  729. .Se
  730. .
  731. .Pr symbol? obj
  732. See \*R.
  733. .
  734. .Pr oblist
  735. Returns a list of lists containing all currently interned symbols.
  736. Each sublist represents a bucket of the interpreters internal
  737. hash array.
  738. .br
  739. Examples:
  740. .Ss
  741. (define (apropos what)
  742.   (let ((ret ()))
  743.     (do ((tail (oblist) (cdr tail))) ((null? tail))
  744.       (do ((l (car tail) (cdr l))) ((null? l))
  745.         (if (substring? what (symbol->string (car l)))
  746.             (set! ret (cons (car l) ret)))))
  747.     ret))
  748. .Se
  749. .Ss
  750. .ta 7c
  751. (apropos "let")    ==>  (let* let letrec fluid-let)
  752. (apropos "make")    ==>  (make-list make-vector make-string)
  753. (apropos "foo")    ==>  ()
  754. .Se
  755. .
  756. .Ch Environments
  757. .
  758. .Pr the-environment
  759. Returns the current environment.
  760. .
  761. .Pr global-environment
  762. Returns the global environment (the ``root'' environment in which
  763. all predefined procedures are bound).
  764. .
  765. .Pr environment\(mi>list environment
  766. Returns a list representing the specified environment.
  767. The list is a list of \f2frames\fP, each frame is a list of bindings
  768. (an \f2alist\fP).
  769. The car of the list represents the most recently established environment.
  770. The list returned by \f2environment\(mi>list\fP can contain cycles.
  771. .br
  772. Examples:
  773. .Ss
  774. (let ((x 1) (y 2))
  775.   (car (environment->list
  776.     (the-environment))))    ==>  ((y . 2) (x . 1))
  777. .Se
  778. .Ss
  779. ((lambda (foo)
  780.    (caar (environment->list
  781.      (the-environment)))) "abc")    ==>  (foo . "abc")
  782. .Se
  783. .Ss
  784. (eq?
  785.   (car (last-pair (environment->list
  786.     (the-environment))))
  787.   (car (environment->list
  788.     (global-environment))))    ==>  #t
  789. .Se
  790. .
  791. .Pr procedure-environment procedure
  792. .Up
  793. .Pr promise-environment promise
  794. .Up
  795. .Pr control-point-environment control-point
  796. Returns the environment in which the the body of the \f2procedure\fP
  797. is evaluated, the environment in which a value for the \f2promise\fP
  798. is computed when \f2force\fP is applied to it, or the environment in
  799. which the \f2control-point\fP has been created, respectively.
  800. .
  801. .Pr environment? obj
  802. Returns #t if \f2obj\fP is an environment, #f otherwise.
  803. .
  804. .Ch Ports and Files
  805. .LP
  806. Generally, a file name can either be a string or a symbol.
  807. If a symbol is given, it is converted into a string by
  808. applying \f2symbol\(mi>string\fP.
  809. A tilde at the beginning of a file name is expanded according
  810. to the rules employed by the C-Shell (see \f2csh\fP(1)).
  811. .LP
  812. Elk adds a third type of ports, \f2input-output\fP (bidirectional) ports.
  813. Both \f2input-port?\fP and \f2output-port?\fP return #t when applied
  814. to an input-output port, and both input primitives and output
  815. primitives may be applied to input-output ports.
  816. An input-output port (in fact, \f2any\fP port) may be closed with any of
  817. the primitives \f2close-input-port\fP and \f2close-output-port\fP.
  818. .LP
  819. The only way to create an input-output-port is by means of the
  820. procedure \f2open-input-output-file\fP.
  821. Extensions may provide additional means to create bidirectional ports.
  822. .
  823. .Pr call-with-input-file file procedure
  824. .Up
  825. .Pr call-with-output-file file procedure
  826. See \*R.
  827. .
  828. .Pr input-port? obj
  829. .Up
  830. .Pr output-port? obj
  831. See \*R.
  832. .
  833. .Pr current-input-port
  834. .Up
  835. .Pr current-output-port
  836. See \*R.
  837. .
  838. .Pr with-input-from-file file thunk
  839. .Up
  840. .Pr with-output-to-file file thunk
  841. See \*R.
  842. .br
  843. \f2file\fP can be a string as well as a symbol.
  844. .
  845. .Pr open-input-file file
  846. .Up
  847. .Pr open-output-file file
  848. .Up
  849. .Pr open-input-output-file file
  850. See \*R.
  851. .br
  852. \f2file\fP can be a string as well as a symbol.
  853. \f2open-input-output-file\fP opens the file for reading and writing
  854. and returns an input-output port; the file must exist and is not
  855. truncated.
  856. .
  857. .Pr close-input-port port
  858. .Up
  859. .Pr close-output-port port
  860. See \*R.
  861. .br
  862. Calls to \f2close-input-port\fP and \f2close-output-port\fP are ignored
  863. when applied to string ports or to ports connected with the standard
  864. input or standard output of the process.
  865. .
  866. .Pr clear-output-port
  867. .Up
  868. .Pr clear-output-port output-port
  869. If the argument is omitted, it defaults to the current output port.
  870. .br
  871. In case of ``buffered'' output, this procedure is used to discard
  872. all characters that have been
  873. output to the port but have not yet been sent to the file associated
  874. with the port.
  875. .
  876. .Pr flush-output-port
  877. .Up
  878. .Pr flush-output-port output-port
  879. If the argument is omitted, it defaults to the current output port.
  880. .br
  881. In case of ``buffered'' output, this procedure is used to force
  882. all characters that have been output to the port to be printed
  883. immediately.
  884. This may be necessary to force output that is not terminated with a newline 
  885. to appear on the terminal.
  886. An output port is flushed automatically when it is closed.
  887. .
  888. .Pr clear-input-port
  889. .Up
  890. .Pr clear-input-port input-port
  891. If the argument is omitted, it defaults to the current input port.
  892. .br
  893. In case of ``buffered'' input,
  894. this procedure discards all characters that have already been read
  895. from the file associated with the port but have not been processed
  896. using \f2read\fP or similar procedures.
  897. .
  898. .Pr port-file-name port
  899. Returns the name of the file associated with \f2port\fP if it is
  900. a file port, #f otherwise.
  901. .
  902. .Pr port-line-number
  903. Returns the current line number of a file input port or string input
  904. port, i.\|e. the number of newline characters that have been read from
  905. this port plus one.
  906. ``Unreading'' a newline character decrements the line number, but it
  907. never drops below one.
  908. The result of applying \f2port-line-number\fP to an output port is
  909. undefined.
  910. .
  911. .Pr tilde-expand file
  912. If \f2file\fP starts with a tilde, performs tilde expansion as
  913. described above and returns the result of the expansion
  914. (a string); returns \f2file\fP otherwise.
  915. \f2file\fP is a string or a symbol.
  916. .
  917. .Pr file-exists? file
  918. Returns #t if \f2file\fP is accessible, #f otherwise.
  919. \f2file\fP is a string or a symbol; tilde expansion is not performed.
  920. .
  921. .Ch Input
  922. .
  923. .Pr read
  924. .Up
  925. .Pr read input-port
  926. See \*R.
  927. .
  928. .Pr read-char
  929. .Up
  930. .Pr read-char input-port
  931. See \*R.
  932. .
  933. .Pr read-string
  934. .Up
  935. .Pr read-string input-port
  936. If the argument is omitted, it defaults to the current input port.
  937. .br
  938. Returns the rest of the current input line as a string (not
  939. including the terminating newline).
  940. .
  941. .Pr unread-char char
  942. .Up
  943. .Pr unread-char char input-port
  944. If the second argument is omitted, it defaults to the current input port.
  945. .br
  946. Pushes \f2char\fP back on the stream of input characters.
  947. It is \f2not\fP an error for \f2char\fP not to be the last character
  948. read from the port.
  949. It is undefined whether more than one character can be pushed back without
  950. an intermittent read operation, and whether a character can be pushed
  951. back before something has been read from the port.
  952. The procedure returns \f2char\fP.
  953. .
  954. .Pr peek-char
  955. .Up
  956. .Pr peek-char input-port
  957. See \*R.
  958. .LP
  959. \f2peek-char\fP uses \f2unread-char\fP to push back the character.
  960. .
  961. .Pr eof-object? obj
  962. See \*R.
  963. .
  964. .Ch Output
  965. .
  966. .Va print-length
  967. .Up
  968. .Va print-depth
  969. These variables are defined in the global environment.
  970. They control the maximum length and maximum depth, respectively, of
  971. a list or vector that is printed.
  972. If one of the variables is not bound to an integer, or if its value
  973. exceeds a certain, large maximum value (which is at least 2^20),
  974. a default value is taken.
  975. The default value for \f2print-length\fP is 1000, and the default
  976. value for \f2print-depth\fP is 20.
  977. Negative values of \f2print-length\fP and \f2print-depth\fP are
  978. treated as ``unlimited'', i.\|e. output is not truncated.
  979. .
  980. .Pr write obj
  981. .Up
  982. .Pr write obj output-port
  983. See \*R.
  984. .
  985. .Pr display obj
  986. .Up
  987. .Pr display obj output-port
  988. See \*R.
  989. .
  990. .Pr write-char char
  991. .Up
  992. .Pr write-char char output-port
  993. See \*R.
  994. .
  995. .Pr newline
  996. .Up
  997. .Pr newline output-port
  998. See \*R.
  999. .
  1000. .Pr print obj
  1001. .Up
  1002. .Pr print obj output-port
  1003. If the second argument is omitted, it defaults to the current output port.
  1004. .br
  1005. Prints \f2obj\fP using \f2write\fP and then prints a newline.
  1006. \f2print\fP returns \f2void\fP.
  1007. .
  1008. .Pr format destination format-string obj ...
  1009. Prints the third and the following arguments according to the
  1010. specifications in the string \f2format-string\fP.
  1011. Characters from the format string are copied to the output.
  1012. When a tilde is encountered in the format string, the tilde and
  1013. the immediately following character are replaced in the output
  1014. as follows:
  1015. .IP "~s"
  1016. is replaced by the printed representation of the next \f2obj\fP
  1017. in the sense of \f2write\fP.
  1018. .IP "~a"
  1019. is replaced by the printed representation of the next \f2obj\fP
  1020. in the sense of \f2display\fP.
  1021. .IP "~~"
  1022. is replaced by a single tilde.
  1023. .IP "~%"
  1024. is replaced by a newline.
  1025. .LP
  1026. An error is signaled if fewer \f2obj\fPs are provided than
  1027. required by the given format string.
  1028. If the format string ends in a tilde, the tilde is ignored.
  1029. .LP
  1030. If \f2destination\fP is #t, the output is sent to the current
  1031. output port; if #f is given, the output is returned as a string;
  1032. otherwise, \f2destination\fP must be an output or input-output port.
  1033. .br
  1034. Examples:
  1035. .Ss
  1036. (format #f "Hello world!")    ==>  "Hello world"
  1037. (format #f "~s world!" "Hello")    ==>  "\e"Hello\e" world"
  1038. (format #f "~a world!" "Hello")    ==>  "Hello world"
  1039. (format #f "Hello~a")    ==>  "Hello!"
  1040. .Se
  1041. .Ss
  1042. (define (flat-size s)
  1043.   (fluid-let ((print-length 1000) (print-depth 100))
  1044.     (string-length (format #f "~a" s))))
  1045. .Se
  1046. .Ss
  1047. (flat-size 1.5)    ==>  3
  1048. (flat-size '(a b c))    ==>  7
  1049. .Se
  1050. .
  1051. .Ch String Ports
  1052. .LP
  1053. String ports are similar to file ports, except that characters are
  1054. appended to a string instead of being sent to a file, or taken
  1055. from a string instead of being read from a file.
  1056. It is not necessary to close string ports.
  1057. When an string input port has reached the end of the input string,
  1058. successive read operations return end-of-file.
  1059. .
  1060. .Pr open-input-string string
  1061. Returns a new string input port initialized with \f2string\fP.
  1062. .br
  1063. Examples:
  1064. .Ss
  1065. (define p (open-input-string "Hello world!"))
  1066. (read-char p)    ==>  #\eH
  1067. (read p)    ==>  ello
  1068. (read p)    ==>  world!
  1069. (read p)    ==>  \f2end of file\fP
  1070. .Se
  1071. .Ss
  1072. (define p (open-input-string "(cons 'a 'b)"))
  1073. (eval (read p))    ==>  (a . b)
  1074. .Se
  1075. .
  1076. .Pr open-output-string
  1077. Returns a new string output port.
  1078. .
  1079. .Pr get-output-string string-output-port
  1080. Returns the string currently associated with the specified string
  1081. output port.
  1082. As a side-effect, the string is reset to zero length.
  1083. .br
  1084. Examples:
  1085. .Ss
  1086. (define p (open-output-string))
  1087. (display '(a b c) p)
  1088. (get-output-string p)    ==>  "(a b c)"
  1089. (get-output-string p)    ==>  ""
  1090. .Se
  1091. .Ss
  1092. (define (flat-size s)
  1093.   (let ((p (open-output-string)))
  1094.     (display s p)
  1095.     (string-length (get-output-string p))))
  1096. .Se
  1097. .
  1098. .Ch Loading
  1099. .
  1100. .Pr load file
  1101. .Up
  1102. .Pr load file environment
  1103. Loads a source file or one or more object files.
  1104. If the file contains source code, the expressions in the file are
  1105. read and evaluated.
  1106. If a file contains object code, the contents of the file is linked
  1107. together with the running interpreter and with additional libraries
  1108. that are specified by the variable \f2load-libraries\fP (see below).
  1109. Names of object files must have the suffix ``.o''.
  1110. \f2load\fP returns \f2void\fP.
  1111. .LP
  1112. \f2file\fP must be either a string or a symbol or a list of strings
  1113. or symbols.
  1114. If it is a list, all elements of the list must be the names of object files.
  1115. In this case, all object files are linked by a single run of the linker.
  1116. .br
  1117. If an optional \f2environment\fP is specified, the contents of the file
  1118. is evaluated in this environment instead of the current environment.
  1119. .br
  1120. Example:
  1121. .Ss
  1122. (fluid-let ((load-noisily? #t))
  1123.   (load 'test.scm))
  1124. .Se
  1125. .
  1126. .Va load-path
  1127. This variable is defined in the global environment.
  1128. It is bound to a list of directories in which files to be loaded are
  1129. searched for.
  1130. Each element of the list (a string or a symbol) is used in turn as
  1131. a prefix for the file name passed to \f2load\fP until opening succeeds.
  1132. Elements of \f2load-path\fP that are not of type string or symbol are ignored.
  1133. .LP
  1134. If the value of \f2load-path\fP is not a list of at least one valid
  1135. component, or if the name of the file to be loaded starts with ``/''
  1136. or with ``~'', it is opened directly.
  1137. .LP
  1138. The initial value of \f2load-path\fP is a list of the three elements
  1139. ``.'' (i.\|e. the current directory), ``$(TOP)/scm'', and ``$(TOP)/lib'',
  1140. where $(TOP) is the top-level directory of the Elk installation.
  1141. .
  1142. .Va load-noisily?
  1143. This variable is defined in the global environment.
  1144. When a file is loaded and the value of \f2load-noisily?\fP is true,
  1145. the result of the evaluation of each expression is printed.
  1146. The initial value of \f2load-noisily\fP is #f.
  1147. .
  1148. .Va load-libraries
  1149. This variable is defined in the global environment.
  1150. If \f2load-libraries\fP is bound to a string, its value specifies
  1151. additional load libraries to be linked together with an object file
  1152. that is loaded into the interpreter (see \f2load\fP above).
  1153. Its initial value is ``-lc''.
  1154. .
  1155. .Pr autoload symbol file
  1156. Binds \f2symbol\fP in the current environment (as with \f2define\fP).
  1157. When \f2symbol\fP is evaluated the first time, \f2file\fP is loaded.
  1158. The definitions loaded from the file must provide a definition
  1159. for \f2symbol\fP different from \f2autoload\fP, otherwise an error
  1160. is signaled.
  1161. .LP
  1162. \f2file\fP must be either a string or a symbol or a list of strings
  1163. or symbols, in which case all elements of the list must be the names
  1164. of object files (see \f2load\fP above).
  1165. .
  1166. .Va autoload-notify?
  1167. This variable is defined in the global environment.
  1168. If the value of \f2autoload-notify?\fP is true, a message is printed
  1169. whenever evaluation of a symbol triggers autoloading of a file.
  1170. \f2autoload-notify?\fP is bound to #t initially.
  1171. .
  1172. .Ch Macros
  1173. .
  1174. .Sy macro formals body
  1175. Creates a macro.
  1176. The syntax is identical to the syntax of \f2lambda\fP expressions.
  1177. When a macro is called, the actual arguments are bound to
  1178. the formal arguments of the \f2macro\fP expression \f2in the current
  1179. environment\fP (they are \f2not\fP evaluated), then the \f2body\fP is evaluated.
  1180. The result of this evaluation is considered the \f2macro expansion\fP
  1181. and is evaluated in place of the macro call.
  1182. .
  1183. .Sy define-macro (variable formals) body
  1184. .Up
  1185. .Sy define-macro (variable . formal) body
  1186. Like \f2define\fP, except that \f2macro\fP is used instead of \f2lambda\fP.
  1187. .br
  1188. Examples:
  1189. .Ss
  1190. (define-macro (++ x) `(set! ,x (1+ ,x)))
  1191. (define foo 5)
  1192. foo    ==>  5
  1193. (++ foo)
  1194. foo    ==>  6
  1195. .Se
  1196. .Ss
  1197. (define-macro (while test . body)
  1198.   `(let loop ()
  1199.      (cond (,test ,@body (loop)))))
  1200. .Se
  1201. .
  1202. .Pr macro? obj
  1203. Returns #t if \f2obj\fP is a macro, #f otherwise.
  1204. .
  1205. .Pr macro-body macro
  1206. Returns a copy of the \f2macro\fP expression which has been evaluated to
  1207. created the given macro (similar to \f2procedure-lambda\fP).
  1208. .br
  1209. Examples:
  1210. .Ss
  1211. (define-macro (++ x) `(set! ,x (1+ ,x)))
  1212. .Sp
  1213. (macro-body ++)
  1214.   ==>  (macro (x) (quasiquote (set! (unquote x) (1+ (unquote x)))))
  1215. .Se
  1216. .
  1217. .Pr macro-expand list
  1218. If the expression \f2list\fP is a macro call, the macro call
  1219. is expanded.
  1220. .br
  1221. Examples:
  1222. .Ss
  1223. (define-macro (++ x) `(set! ,x (1+ ,x)))
  1224. .sp
  1225. (macro-expand '(++ foo))    ==>  (set! foo (1+ foo))
  1226. .Se
  1227. .sp
  1228. The following function can be used to expand \f2all\fP macro calls
  1229. in an expression, i.\|e. not only at the outermost level:
  1230. .Ss
  1231. (define (expand form)
  1232.   (if (or (not (pair? form)) (null? form))
  1233.       form
  1234.       (let ((head (expand (car form)))
  1235.             (args (expand (cdr form)))
  1236.         (result))
  1237.         (if (and (symbol? head) (bound? head))
  1238.             (begin
  1239.               (set! result (macro-expand (cons head args)))
  1240.               (if (not (equal? result form))
  1241.                   (expand result)
  1242.                   result))
  1243.               (cons head args)))))
  1244. .Se
  1245. .
  1246. .Ch Error and Exception Handling
  1247. .
  1248. .Va error-handler
  1249. This variable is defined in the global environment.
  1250. When an error occurs or when the procedure \f2error\fP is invoked
  1251. and the variable \f2error-handler\fP is bound to a compound procedure
  1252. (the \f2error handler\fP), the interpreter invokes this procedure.
  1253. The error handler is called with an object (either the first argument
  1254. that has been passed to \f2error\fP or a symbol identifying the
  1255. primitive procedure that has caused the error), and an error
  1256. message consisting of a format string
  1257. and a list of objects suitable to be passed to \f2format\fP.
  1258. .LP
  1259. Typically, a user-defined error handler prints the error message and then
  1260. calls a control point that has been created outside the error handler.
  1261. If the error handler terminates normally or if \f2error-handler\fP
  1262. is not bound to a procedure, the error message is printed in a
  1263. default way, and then a \f2reset\fP is performed.
  1264. .
  1265. .Va interrupt-handler
  1266. This variable is defined in the global environment.
  1267. When an interrupt occurs (typically as a result of typing the
  1268. interrupt character on the keyboard), and the variable
  1269. \f2interrupt-handler\fP is bound to a procedure (the \f2interrupt
  1270. handler\fP), this procedure is called with no arguments.
  1271. If \f2interrupt-handler\fP is not bound to a procedure or if
  1272. the procedure terminates normally, a message is printed, and
  1273. a \f2reset\fP is performed.
  1274. .br
  1275. Examples:
  1276. .Ss
  1277. (set! interrupt-handler
  1278.   (lambda ()
  1279.     (newline)
  1280.     (backtrace)
  1281.     (reset)))
  1282. .Se
  1283. .
  1284. .Pr error obj string obj ...
  1285. Signals an error.
  1286. The arguments of \f2error\fP are passed to the \f2error-handler\fP.
  1287. .br
  1288. Examples:
  1289. .Ss
  1290. (define (foo sym)
  1291.   (if (not (symbol? sym))
  1292.       (error 'foo "argument not a symbol: ~s" sym))
  1293.   ...
  1294. .Se
  1295. .
  1296. .Va top-level-control-point
  1297. .Up
  1298. .Pr reset
  1299. Performs a reset by calling the control point to which the variable
  1300. \f2top-level-control-point\fP is bound in the global environment.
  1301. The control point is called with the argument #t.
  1302. If \f2top-level-control-point\fP is not bound to a control point,
  1303. an error message is printed and the interpreter is terminated.
  1304. .br
  1305. Examples:
  1306. .Ss
  1307. (if (call-with-current-continuation
  1308.       (lambda (x)
  1309.         (fluid-let ((top-level-control-point x))
  1310.           \f2do something\fP
  1311.           #f)))
  1312.     (print "Got a reset!"))
  1313. .Se
  1314. .
  1315. .Pr exit
  1316. .Up
  1317. .Pr exit n
  1318. Terminates the interpreter.
  1319. The optional argument \f2n\fP indicates the exit code;
  1320. it defaults to zero.
  1321. .
  1322. .Ch Garbage Collection
  1323. .
  1324. .Pr collect
  1325. Causes a garbage collection.
  1326. .
  1327. .Va garbage-collect-notify?
  1328. This variable is defined in the global environment.
  1329. If the value of \f2garbage-collect-notify?\fP is true,
  1330. a message indicating the amount of free memory on the heap and
  1331. the size of the heap is displayed whenever a garbage collection
  1332. is performed.
  1333. \f2garbage-collect-notify?\fP is bound to #t initially.
  1334. .
  1335. .Ch Features
  1336. .
  1337. .Pr feature? symbol
  1338. Returns #t if \f2symbol\fP is a feature, i.\|e. \f2provide\fP has
  1339. been called to indicate that the feature \f2symbol\fP is present;
  1340. #f otherwise.
  1341. .
  1342. .Pr provide symbol
  1343. Indicates that the feature \f2symbol\fP is present.
  1344. Returns \f2void\fP.
  1345. .
  1346. .Pr require symbol
  1347. .Up
  1348. .Pr require symbol file
  1349. .Up
  1350. .Pr require symbol file environment
  1351. If the feature \f2symbol\fP is not present (i.\|e.
  1352. (feature? \f2symbol\fP) evaluates to #f), \f2file\fP is loaded.
  1353. A message is displayed prior to loading the file if the value of the
  1354. global variable \f2autoload-notify?\fP is true.
  1355. If the feature is still not present after the file has been loaded,
  1356. an error is signaled.
  1357. If the \f2file\fP argument is omitted, it defaults to \f2symbol\fP.
  1358. If an \f2environment\fP argument is supplied, the file is loaded
  1359. into given environment.
  1360. if the \f2environment\fP argument is omitted, it defaults to the
  1361. current environment.
  1362. .LP
  1363. \f2file\fP must be either a string or a symbol or a list of strings
  1364. or symbols, in which case all elements of the list must be the names
  1365. of object files (see \f2load\fP above).
  1366. .
  1367. .Ch Miscellaneous
  1368. .
  1369. .Pr dump file
  1370. Writes a snapshot of the running interpreter to \f2file\fP and
  1371. returns #f.
  1372. When \f2file\fP is executed, execution of the interpreter resumes such
  1373. that the call to \f2dump\fP returns #t
  1374. (i.e., \f2dump\fP actually returns twice).
  1375. \f2dump\fP closes all ports except the current input and current
  1376. output port.
  1377. .
  1378. .Pr eval list
  1379. .Up
  1380. .Pr eval list environment
  1381. Evaluates the expression \f2list\fP in the specified environment.
  1382. If \f2environment\fP is omitted, the expression is evaluated
  1383. in the current environment.
  1384. .br
  1385. Examples:
  1386. .Ss
  1387. (let ((car 1))
  1388.   (eval 'car (global-environment)))    ==>  \f2primitive\fP \f1car\fP
  1389. .Se
  1390. .Ss
  1391. (define x 1)
  1392. (define env
  1393.   (let ((x 2)) (the-environment)))
  1394. (eval 'x)    ==>  1
  1395. (eval 'x env)    ==>  2
  1396. .Se
  1397. .
  1398. .Pr bound? symbol
  1399. Returns #t if \f2symbol\fP is bound in the current environment,
  1400. #f otherwise.
  1401. .
  1402. .Pr type obj
  1403. Returns a symbol indicating the type of \f2obj\fP.
  1404. .br
  1405. Examples:
  1406. .Ss
  1407. (type 13782343423544)    ==>  integer
  1408. (type 1.5e8)    ==>  real
  1409. (type (lambda (x y) (cons x y)))    ==>  compound
  1410. (type #\ea)    ==>  character
  1411. (type '(a b c))    ==>  pair
  1412. (type ())    ==>  null
  1413. (type (read
  1414.   (open-input-string "")))    ==>  end-of-file
  1415. .Se
  1416. .
  1417. .Pr void? obj
  1418. Returns true if \f2obj\fP is the non-printing object, false otherwise.
  1419. .
  1420. .Pr command-line-args
  1421. Returns the command line arguments of the interpreter's invocation,
  1422. a list of strings.
  1423. .
  1424. .Ch Incompatibilities with the \*R
  1425. .LP
  1426. The following list enumerates the points where the Elk Extension Language
  1427. does not conform to the \*R.
  1428. These are language features which could cause a Scheme program to not
  1429. properly run under Elk, although it does run under a \*R-conforming
  1430. implementation.
  1431. .IP \(bu
  1432. Quasiquotation can currently not be used to construct vectors.
  1433. .IP \(bu
  1434. Rational and complex numbers are not implemented.
  1435. .IP \(bu
  1436. All numbers are inexact.
  1437. .IP \(bu
  1438. #b #o #d #x
  1439. Radix prefixes (#b, #o, #d, and #x) for real numbers are currently
  1440. not implemented.
  1441. .IP \(bu
  1442. Prefixes for exact and inexact constants (#e and #i) are not implemented.
  1443. .IP \(bu
  1444. \f2exact\(mi>inexact\fP and \f2inexact\(mi>exact\fP are not implemented.
  1445. .IP \(bu
  1446. \f2char-ready?\fP is not implemented.
  1447. .IP \(bu
  1448. \f2transcript-on\fP and \f2transcript-off\fP are not implemented.
  1449.